public class SterDemo {

    public static void main(String[] args) {
        int a = 10;
        switch (a){
            case 1:
                System.out.println("1");
                break;
            case 2:
                System.out.println("2");
                break;
            default:
                System.out.println("输入有误");
                break;
        }
    }
    public static void main1(String[] args) {
        int year = 2024;
        if ((year % 100 == 0 && year % 400 == 0) || (year % 100 != 0 && year % 400 != 0 )){
            System.out.println(year + "是闰年" );
        }else {
            System.out.println(year + "不是闰年" );
        }
    }
}